package org.xi.behavioral.command;

public class Main {
    public static void main(String[] args) {
        Application app = new Application();
        Button openButton = new Button();
        Button saveButton = new Button();

        openButton.setCommand(new OpenFileCommand(app));
        saveButton.setCommand(new SaveFileCommand(app));

        openButton.click(); // 输出: Opening a file...
        saveButton.click(); // 输出: Saving a file...
    }
}